#ifndef DATABASEMANAGER_H
#define DATABASEMANAGER_H

#include <QObject>
#include <QSqlDatabase>
#include <qchar.h>
#include <qsqldatabase.h>

class DataBaseManager : public QObject
{
    Q_OBJECT
public:
    static DataBaseManager &getInstance();

    ~DataBaseManager();

    bool openDatabase(const QString &dbPath);
    void closeDatabase();

    QString getDatabasePath() const;
    void setDatabasePath(const QString &path);

private:
    explicit DataBaseManager(QObject *parent = nullptr);

private:
    QSqlDatabase db;
    QString dbPath;
};

#endif // DATABASEMANAGER_H
